﻿/// <reference name="MicrosoftAjax.js" /> 
/// <reference path="file://C:/Program Files/Common Files/Microsoft Shared/Web Server Extensions/14/TEMPLATE/LAYOUTS/SP.core.debug.js" />
/// <reference path="file://C:/Program Files/Common Files/Microsoft Shared/Web Server Extensions/14/TEMPLATE/LAYOUTS/SP.debug.js" />
/// <reference path="file://C:/Program Files/Common Files/Microsoft Shared/Web Server Extensions/14/TEMPLATE/LAYOUTS/1031/CORE.debug.js"/> 


// Deselects all items in selected list
function deselectAllItems()
{
    var ctxT = GetCurrentCtx();
    var rows = ctxT.clvp.tab.rows;
    DeselectAllItems(ctxT, rows, true);
    UpdateSelectAllCbx(ctxT, false);
}

// Serves for the activation of buttons (in the Ribbon) in dependence on whether at least one entry was selected
function enable()
{
    var selectedItems = SP.ListOperation.Selection.getSelectedItems();
    for (var i = 0; i < selectedItems.length; i++) {
        if (selectedItems[i].fsObjType == 1) { return false; }
    }
    return (0 < CountDictionary(selectedItems))
}